<template>
	<view class="nav-bar-white">
		<view :style="{height:statusBarHeight+'px'}"></view>
		<uni-nav-bar left-icon="left" background-color="#FFF" color="#000" @clickLeft="back" title="用户管理" :border="false" fixed="true"></uni-nav-bar>
	</view>
	<view class="top-search" :style="{marginTop:statusBarHeight+45+'px'}">
		<view class="search-bg">
			<!-- <superwei-combox :isDisabled="true" style="width: 25vw;" :border="false" :candidates="candidates" placeholder="用户昵称" v-model="searchTitle" @select="select"></superwei-combox> -->
			<uni-combox style="width: 25vw;" :isDisabled="true" :showClear="false" labelKey="name" valueKey="id" :candidates="candidates" placeholder="用户昵称" v-model="searchTitle" :border="false" @input="select"></uni-combox>
			<input v-model="seachContent" class="seach-input" maxlength="11" placeholder="请输入搜索内容" />
		</view>
		<view class="company-bg">
			
			<uni-combox labelKey="name" valueKey="id" :candidates="candidates1" placeholder="所属单位" v-model="searchCompany" :border="false" @input="companyChange"></uni-combox>
		</view>
		
	</view>
	
	<view style="padding-bottom: 100rpx;">
		<view class="user-items" v-for="(item,index) in candidates1" :key="index">
			<view class="flex-row items-center">
				<view style="width: 20%;display: flex;justify-content: center;">
					<image src="/static/manage_avator.png" style="width: 100rpx;height: 100rpx;"></image>
				</view>
				
				<view class="flex-col justify-start" style="width: 80%;margin-left: 10rpx;">
					<view class="flex-row justify-between items-center">
						<view class="flex-row">
							<text>张三</text>
							<text style="color: #666666;margin-left: 10rpx;">ID：1234566</text>
						</view>
						<view class="real-bg">已实名</view>
					</view>
					<text style="margin-top: 10rpx;font-size: 25rpx;">17777777777</text>
					<view class="flex-row" style="color: #999999;font-size: 25rpx;margin-top: 10rpx;gap: 20rpx;">
						<text>云豆：100</text>
						<text>生日豆：100</text>
						<text>帮扶豆：100</text>
					</view>
				</view>
			</view>
			<view class="line" style="margin-top: 30rpx;"></view>
			<text style="margin-top: 30rpx;font-size: 26rpx;">所属单位：暂无所属单位</text>
		</view>
	</view>
	
</template>

<script>
	import { useUserStore } from '../../store/userStore';
	export default {
		data() {
			return {
				seachContent:'',
				searchTitle:'',
				searchCompany:'所属单位',
				candidates:[
					{
						name:'用户昵称',
						id:'1'
					},
					{
						name:'用户ID',
						id:'2'
					},
					{
						name:'手机号码',
						id:'3'
					},
				],
				candidates1:[
					{
						name:'所属单位名称1',
						id:'1'
					},
					{
						name:'所属单位名称2',
						id:'2'
					},
					{
						name:'所属单位名称所属单位名称所属单位名称3',
						id:'3'
					},
					{
						name:'所属单位名称4',
						id:'4'
					},
					{
						name:'所属单位名称5',
						id:'5'
					},
					{
						name:'所属单位名称6',
						id:'6'
					},
					{
						name:'所属单位名称7',
						id:'7'
					},
				],
			};
		},
		computed:{
			statusBarHeight(){
				return useUserStore().statusBarHeight
			}
		},
		methods:{
			selectCompany(){
				
			},
			select(e) {
				console.log(e) // 选项一
			},
			companyChange(e) {
				console.log(e) // 选项一
			},
			
			back(){
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
.top-search{
	background-color: #fff;
	padding: 20rpx;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.search-bg{
	display: flex;
	flex-direction: row;
	background-color: #F3F3F3;
	border-radius: 45rpx;
	height: 88rpx;
	align-items: center;
	padding-left: 30rpx;
	padding-right: 20rpx;
}
.seach-input{
	background-color: #F3F3F3;
	margin-left: 30rpx;
}
.company-bg{
	margin-top: 20rpx;
	height: 70rpx;
	display: flex;
	align-items: center;
	color: #333333;
	font-size: 27rpx;
	padding-left: 30rpx;
}
.user-items{
	background-color: #fff;
	margin-top: 15rpx;
	margin-left: 15rpx;
	margin-right: 15rpx;
	border-radius: 15rpx;
	padding: 20rpx;
	display: flex;
	flex-direction: column;
}
.real-bg{
	background-color: #F4F5F7;
	border-radius: 10rpx;
	padding: 4rpx 12rpx;
	font-size: 25rpx;
}
</style>
